using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace QFramework.Adventure
{
    public class SnailHitState : FSMBaseState
    {
        public override void EnterState(FSMBaseObj obj)
        {
            Debug.Log("Enter=>SnailHitState");
            obj.animWalk = false;
            obj.animHit = true;
        }

        public override void OnExit(FSMBaseObj obj)
        {
         
        }

        public override void OnFixedUpdate(FSMBaseObj obj)
        {
           
        }

        public override void OnUpdate(FSMBaseObj obj)
        {
            if (!obj.animHit)
            {
                obj.rb.velocity = Vector2.zero;

                obj.TransitionToState(obj.patrolState);

            }


        }
    }
}